import java.io.Console;

import engine.Vector;
import quadTree.BoundingBox;
import quadTree.BoundingBox.IntersectRes;

import junit.framework.TestCase;

public class BoundingBoxUnitTest extends TestCase{

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		BoundingBox a, b;
		
		a = new BoundingBox(new Vector(-2,-2),new Vector(2,2));
		b = new BoundingBox(new Vector(-1,-1),new Vector(1,1));
		
		/*System.out.print("A contains B: ");
		if(a.Contains(b) == IntersectRes.contains)
			System.out.println("Pass");
		else
			System.out.println("Fail");*/
		
		assertTrue(a.Contains(b) == IntersectRes.contains);
		
		a = new BoundingBox(new Vector(-2,-2),new Vector(2,2));
		b = new BoundingBox(new Vector(0,0),new Vector(4,4));
		
		/*System.out.print("A intersects B: ");
		if(a.Contains(b) == IntersectRes.intersect)
			System.out.println("Pass");
		else
			System.out.println("Fail");*/
		
		assertTrue(a.Contains(b) == IntersectRes.intersect);
		
		a = new BoundingBox(new Vector(-2,-2),new Vector(2,2));
		b = new BoundingBox(new Vector(-4,-1),new Vector(4,1));
		
		/*System.out.print("A intersects B: ");
		if(a.Contains(b) == IntersectRes.intersect)
			System.out.println("Pass");
		else
			System.out.println("Fail");*/
		
		assertTrue(a.Contains(b) != IntersectRes.intersect);
		
		a = new BoundingBox(new Vector(-2,-2),new Vector(2,2));
		b = new BoundingBox(new Vector(3,3),new Vector(4,4));
		
		/*System.out.print("A disjoint B: ");
		if(a.Contains(b) == IntersectRes.disjoint)
			System.out.println("Pass");
		else
			System.out.println("Fail");*/
		
		assertTrue(a.Contains(b) == IntersectRes.disjoint);
		
	}

}
